public class Student {
	
	private String nr;
	private String lastname;
	private String surname;
	private Boolean[] visitedoptsubs;
	
	public Student(String nr, String lastname, String surname, Boolean[] visitedoptsubs) {
		this.nr = nr;
		this.lastname = lastname;
		this.surname = surname;
		this.visitedoptsubs = visitedoptsubs;
	}
	
	public String getNr() {
		return this.nr;
	}
	
	public String getLastname() {
		return this.lastname;
	}
	
	public String getSurname() {
		return this.surname;
	}
	
	public boolean visitsOptSub(int i) {
		if (i < visitedoptsubs.length)
			return visitedoptsubs[i];
		else 
			return false;
	}
	
	public String toCSVString() {
		String output = String.format("%s;%s;%s", nr, lastname, surname);
		for (Boolean visitsoptsub: visitedoptsubs) {
			output += ";" + (visitsoptsub != null ? (visitsoptsub ? "x" : "") : "");
		}
		return output;
	}
}